package main

import "fmt"

type Book struct {
	id int
	title string
	author string
	subject string
}

func st(){
	var book Book = Book{1,"量子力学","爱因斯坦","科学"}
	book1 := Book{title: "Go 语言", author: "www.runoob.com"}

	book1.subject = "计算机科学"

	printBook(book)
	printBook(book1)
}

func printBook(b Book){
	fmt.Printf( "Book title : %s\n", b.title);
	fmt.Printf( "Book author : %s\n", b.author);
	fmt.Printf( "Book subject : %s\n", b.subject);
	fmt.Printf( "Book book_id : %d\n", b.id);
}